from php4dvd.pages.page import Page
from selenium.webdriver.common.by import By

class MovieAddingPage(Page):

    @property
    def save_description_button(self):
        return self.driver.find_element_by_css_selector ("img[title=\"Save\"]")

    @property
    def movie_name_field(self):
        return self.driver.find_element_by_name("name")

    @property
    def movie_year_field(self):
        return self.driver.find_element_by_name("year")

    @property
    def is_this_page(self):
        return self.is_element_visible((By.CSS_SELECTOR, "img[title=\"Save\"]"))
